import com.nlx.notes.support.util.UniqueCodeGenerator;

public class TestUniqueCodeGenerator {
    public static void main(String[] args) {
        System.out.println("Testing UniqueCodeGenerator...");
        
        // Test generating incremental unique codes
        String code1 = UniqueCodeGenerator.generateIncrementalUniqueCode(10);
        String code2 = UniqueCodeGenerator.generateIncrementalUniqueCode(10);
        String code3 = UniqueCodeGenerator.generateIncrementalUniqueCode(10);
        
        System.out.println("Code 1: " + code1);
        System.out.println("Code 2: " + code2);
        System.out.println("Code 3: " + code3);
        
        // Test validation
        System.out.println("Code 1 length: " + code1.length() + ", is numeric: " + code1.matches("\\d+"));
        System.out.println("Code 2 length: " + code2.length() + ", is numeric: " + code2.matches("\\d+"));
        System.out.println("Code 3 length: " + code3.length() + ", is numeric: " + code3.matches("\\d+"));
        
        // Test different lengths
        System.out.println("\nTesting different lengths:");
        for (int length = 6; length <= 12; length++) {
            String code = UniqueCodeGenerator.generateIncrementalUniqueCode(length);
            System.out.println("Length " + length + ": " + code);
        }
        
        // Test backward compatibility
        System.out.println("\nTesting backward compatibility:");
        String oldCode = UniqueCodeGenerator.generateUniqueCode(8);
        System.out.println("Old method code: " + oldCode);
    }
}